#!/bin/bash
input_file="$1"
output_file="$2"
[[ ! -f $input_file ]] && echo "Input \'$input_file\' is not a file!" >&2 && exit 1
printf "" > $output_file;
line_num=1
cat $input_file | while read line;
do
    echo "$line" | grep "//\\( \\)*BREAKPOINT ABOVE" > /dev/null && echo $(($line_num - 1)) >> $output_file
    echo "$line" | grep "//\\( \\)*BREAKPOINT BELOW" > /dev/null && echo $(($line_num + 1)) >> $output_file
    ((line_num++))
done
